how to determine if a relation is a function